package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.UserMapper;
import com.itheima.pojo.User;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * @outhor
 * @date 2020/2/8 16:03
 */

@Service(interfaceClass = UserService.class)
@Transactional
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User userByUserName(String username) {
        return userMapper.userByUserName(username);
    }

    @Override
    public void changePassword(String pass, String username) {
        userMapper.changePassword(pass,username);
    }
}
